package com.jdls.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author 嘉德罗斯
 * @date 2021/9/15
 */
@Controller
@RequestMapping("test")
public class Test1 {
    @GetMapping("{id}")
    @ResponseBody
    public String findById( @PathVariable int id){
        System.out.println("findById->"+id);
        return "ok";
    }
    @GetMapping
    @ResponseBody
    public String find(){
        System.out.println("find");
        return "ok";
    }
    @PutMapping("{id}")
    @ResponseBody
    public String update(@PathVariable int id){
        System.out.println("update->"+id);
        return "ok";
    }
    @DeleteMapping("{id}")
    @ResponseBody
    public String delete(@PathVariable int id){
        System.out.println("delete->"+id);
        return "ok";
    }
    @PostMapping
    @ResponseBody
    public String add(){
        System.out.println("add");
        return "ok";
    }
}
